<?php 
class produtoController extends CController{
    public $model_name = 'venda/produto';
       
    public function show($display = true, $link = "") {
        if(CURRENT_ACTION == 'show') Redirect (LINK);
        else parent::show($display, $link);
    }
    
    public function setdefault(){
        $this->model->setDefault($this->cod);
        $this->redirect(LINK);
    }
    
    public function restaurar(){
        $this->model->restaurar($this->cod);
        $this->redirect(LINK);
    }
}
?>